
		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'contact-form',
			'enableClientValidation'=>true,
			'clientOptions'=>array(
				'validateOnSubmit'=>false,
			),
		)); ?>
		
			<?php // echo Yii::t('admin','<p class="note">Fields with <span class="required">*</span> are required.</p>');?>
		
			<?php echo $form->errorSummary($model); ?>
			<div class="span-13">		
 				<div class="row span-6 colborder">
					<?php echo $form->labelEx($model,'name'); ?>
					<?php echo $form->textField($model,'name'); ?>
					<?php echo $form->error($model,'name'); ?>
				</div>
			
				<div class="row span-6">
					<?php echo $form->labelEx($model,'email'); ?>
					<?php echo $form->textField($model,'email'); ?>
					<?php echo $form->error($model,'email'); ?>
				</div>
				
				<div class="row clear">
					<?php echo $form->labelEx($model,'subject'); ?>
					<?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?>
					<?php echo $form->error($model,'subject'); ?>
				</div>
			
				<div class="row">
					<?php echo $form->labelEx($model,'body'); ?>
					<?php //echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50,'style'=>'height:350px;')); ?>

                    <div class="row">
						<!--style给定宽度可以影响编辑器的最终宽度-->
						<script type="text/plain" id="myEditor" name="ContactForm[body]" style="width:100%">
						<?php echo $model->body; ?>
						</script>
						<?php echo $form->error($model,'body'); ?>
					</div>
					<?php echo $form->error($model,'body'); ?>
				</div>
				
								
				<?php if(CCaptcha::checkRequirements()): ?>
				<div class="row">
					<?php echo $form->labelEx($model,'verifyCode'); ?>
					<div class="span-4 colborder">
					
					<?php echo $form->textField($model,'verifyCode'); ?>
					</div>
					<div class="span-14">
						<?php $this->widget('CCaptcha'); ?>
						<span class="hint">
							<?php echo Yii::t('contact','Please enter the letters as they are shown in the image above.
					<br/>Letters are not case-sensitive.')?></span>
					</div>
					
					
					<?php echo $form->error($model,'verifyCode'); ?>
				</div>
				<?php endif; ?>
				
				<div class="row buttons">
					<?php //echo CHtml::submitButton('Submit'); ?>
					<?php 
					$this->widget('zii.widgets.jui.CJuiButton',
						array(
							'name'=>'button',
							'caption'=>Yii::t('admin','Submit')
							///'onclick'=>'js:function(){alert("Save button clicked"); this.blur(); return false;}',
						)
					);
					?>
				</div>
			</div>		
		<?php $this->endWidget(); ?>
		
<?php 
	$this->widget('ext.editor.ueditor.ueditorWidget',array(
			'id'=>'myEditor',
			'initialContent' => '<span style="color:#ccc">欢迎使用ueditor</span>',
			'initialStyle' => 'body{margin:8px;font-family:"宋体";font-size:16px;}',
			'elementPathEnabled' => true,
			'minFrameHeight' => 200,
//			'autoClearinitialContent' => true,
			'imagePath' => '/',
			'textarea' => 'content',

			'autoHeightEnabled' => true,
			'toolbars'=>array(array('Undo','Redo','|','ForeColor','BackColor', 'Bold','Italic','Underline','JustifyLeft','JustifyCenter','JustifyRight')),
	));
?>